package com.ying.tests.mongo.entity;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import java.util.Date;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Document(collection = "lp_test_student")
public class Student {

    @Id
    @Field("_id")
    private String id;

    private String name;

    private int age;

    private Date createTime;

    private Date updateTime;
}
